#!/bin/bash

function sleepkill {
sleep $1
kill $2
}

for qetest in 'qe.test';  do
#	    qepcad +N32000000 < $qetest &
		yes &
	    pid=$!
	    echo $pid
	    sleepkill 300 $pid &
	    pid1=$!
	    wait $pid 
		echo "$pid terminated"
		echo "killing $pid1"
	    kill -0 $pid1
	    #kill -TERM $pid
done

hello
